<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>API docs for &ldquo;pymine.iso8601.iso8601&rdquo;</title>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <link href="apidocs.css" type="text/css" rel="stylesheet" />
    
    
  </head>
  <body>
    <h1 class="module">Module p.i.iso8601</h1>
    <p>
      <span id="part">Part of <a href="pymine.html">pymine</a>.<a href="pymine.iso8601.html">iso8601</a></span>
      
      
    </p>
    <div>
      
    </div>
    <div>ISO 8601 date time string parsing</p>
<p>Basic usage: &gt;&gt;&gt; import iso8601 &gt;&gt;&gt; 
iso8601.parse_date(&quot;2007-01-25T12:00:00Z&quot;) 
datetime.datetime(2007, 1, 25, 12, 0, tzinfo=&lt;iso8601.iso8601.Utc 
...&gt;) &gt;&gt;&gt;<table class="fieldTable"></table></div>
    
    
    <div id="splitTables">
      <table class="children sortable" id="id134">
  
  
  
  
  <tr class="class">
    
    
    <td>Class</td>
    <td><a href="pymine.iso8601.iso8601.ParseError.html">ParseError</a></td>
    <td><span>Raised when there is a problem parsing a date string</span></td>
  </tr><tr class="class">
    
    
    <td>Class</td>
    <td><a href="pymine.iso8601.iso8601.Utc.html">Utc</a></td>
    <td><span>UTC</span></td>
  </tr><tr class="class">
    
    
    <td>Class</td>
    <td><a href="pymine.iso8601.iso8601.FixedOffset.html">FixedOffset</a></td>
    <td><span>Fixed offset in hours and minutes from UTC</span></td>
  </tr><tr class="function">
    
    
    <td>Function</td>
    <td><a href="pymine.iso8601.iso8601.html#parse_timezone">parse_timezone</a></td>
    <td><span>Parses ISO 8601 time zone specs into tzinfo offsets</span></td>
  </tr><tr class="function">
    
    
    <td>Function</td>
    <td><a href="pymine.iso8601.iso8601.html#parse_date">parse_date</a></td>
    <td><span>Parses ISO 8601 dates into datetime objects</span></td>
  </tr>
  
</table>
      
      
    </div>
    
    
    
    <div class="function">
        <a name="pymine.iso8601.iso8601.parse_timezone"></a>
        <a name="parse_timezone"></a>
        <div class="functionHeader">
        
        def parse_timezone(tzstring, default_timezone=UTC):
        
      </div>
        <div class="functionBody">
          
          <div>Parses ISO 8601 time zone specs into tzinfo offsets<table class="fieldTable"></table></div>
        </div>
      </div><div class="function">
        <a name="pymine.iso8601.iso8601.parse_date"></a>
        <a name="parse_date"></a>
        <div class="functionHeader">
        
        def parse_date(datestring, default_timezone=UTC):
        
      </div>
        <div class="functionBody">
          
          <div>Parses ISO 8601 dates into datetime objects</p>
<p>The timezone is parsed from the date string. However it is quite common 
to have dates without a timezone (not strictly correct). In this case the 
default timezone specified in default_timezone is used. This is UTC by 
default.<table class="fieldTable"></table></div>
        </div>
      </div>
    
    <address>
      <a href="index.html">API Documentation</a> for pymine, generated by <a href="http://codespeak.net/~mwh/pydoctor/">pydoctor</a> at 2010-04-07 23:15:24.
    </address>
  </body>
</html>